import {get, post} from '../utils/http';
import {API_GET_GIFT_DETAIL, API_OPEN_GIFT, urlFormat} from '../common/constants';

// 获取礼物详情
// {giftId: id}
exports.getGiftDetail = (uid, lessonId) => {
    return get(API_GET_GIFT_DETAIL, {uid: uid, lessonId: lessonId});
};

// 拆礼物
// {giftId: id}
exports.openGift = (giftId) => {
    return post(urlFormat(API_OPEN_GIFT, {giftId: giftId}));
};
